package com.tengju.user.infrastructure.repository.convert;

import com.tengju.user.domain.model.csa.ClubCustomerServiceInfo;
import com.tengju.user.domain.model.csa.GenSecCustomerServiceWorkTypeEnum;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.GenSecCustomerServiceInfoDO;

public class GenSecCustomerserviceInfoConvert {

    public GenSecCustomerserviceInfoConvert() {
    }

    public static ClubCustomerServiceInfo convertClubCsaInfoDOToCInfo(GenSecCustomerServiceInfoDO genSecCustomerServiceInfoDO) {
        if (genSecCustomerServiceInfoDO == null) {
            return null;
        }
        return new ClubCustomerServiceInfo(

                genSecCustomerServiceInfoDO.getCsaName(),
                genSecCustomerServiceInfoDO.getCsaWeChat(),
                genSecCustomerServiceInfoDO.getHeadImage(),
                GenSecCustomerServiceWorkTypeEnum.form(genSecCustomerServiceInfoDO.getWorkType()),
                genSecCustomerServiceInfoDO.getWorkStartTime(),
                genSecCustomerServiceInfoDO.getWorkEndTime(),
                genSecCustomerServiceInfoDO.getCustomerServiceGreet()
        );
    }
}
